#ifndef QTERMINAL_H
#define QTERMINAL_H

#include <QString>

class QTerminalPrivate;
class QTerminal
{
public:
    QTerminal();
    QTerminal(const QString &password);
    ~QTerminal();

    bool run(const QString &cmd, QString *message = Q_NULLPTR);
    bool run(const QStringList &cmdlist, QString *message = Q_NULLPTR);

    bool run(const QString &cmd, bool asAdmin, QString *message = Q_NULLPTR);
    bool run(const  QStringList &cmdlist, bool asAdmin, QString *message = Q_NULLPTR);

    bool runAsAdmin(const QString &cmd, QString *message = Q_NULLPTR);
    bool runAsAdmin(const  QStringList &cmdlist, QString *message = Q_NULLPTR);

private:
    QTerminalPrivate *d;
};

#endif // QTERMINAL_H
